function getRandomIntInclusive(min, max) {
  return min + Math.floor(Math.random()*(max - min));
}

console.log('10-20:'+getRandomIntInclusive(10, 20));
console.log('30-40:'+getRandomIntInclusive(30, 40));
console.log('40-50:'+getRandomIntInclusive(40, 50));